import request from '@/utils/request'

// 获取宠物表格数据
export const getPetListApi = (params) => {
    return request({
        url: '/owners/pet',
        method: 'get',
        params
    })
}

// 获取单个宠物列表信息
export const getPetInfoApi = (id) => {
    return request({
        url: "/owners/pet/" + id,
        method: "get"
    })
}

// 删除宠物信息
export const delPetInfoApi = (id) => {
    return request({
        url: "/owners/pet/" + id,
        method: 'delete'
    })
}

// 添加宠物信息
export const addPetInfoApi = (data) => {
    return request({
        url: "/owners/pet",
        method: "post",
        data
    })
}

// 修改宠物信息
export const editPetInfoApi = (data) => {
    return request({
        url: "/owners/pet/" + data.id,
        method: "put",
        data
    })
}
